package com.gu.mapper;

import com.gu.entity.LeavingMessageDO;
import com.gu.entity.NoticeDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface LeavingMessageMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(LeavingMessageDO record);

    int insertSelective(LeavingMessageDO record);

    int updateByPrimaryKeySelective(LeavingMessageDO record);

    int updateByPrimaryKeyWithBLOBs(LeavingMessageDO record);

    int updateByPrimaryKey(LeavingMessageDO record);

    /**
     * 批量删除
     * @param ids
     * @return
     */
    Integer deleteByIds(@Param("ids") Integer[] ids);

    /**
     * desc:根据主键获取数据:gu_notice.<br/>
     * descSql =  SELECT * FROM gu_notice WHERE <![CDATA[ ID = #{id,jdbcType=INTEGER} ]]>
     * @param id id
     * @return NoticeDO
     */
    LeavingMessageDO getById(Integer id);

    List<LeavingMessageDO> getRecordBySearchParam(@Param("searchParam") String searchParam, @Param("searchDate") String searchDate);

    List<LeavingMessageDO> getRecord(@Param("searchParam") String searchParam, @Param("searchDate") String searchDate);

    List<LeavingMessageDO> getRecordByAreaCode(String areaCode);

    int deleteLeavingMsg(LeavingMessageDO leavingMessageDO);

}